﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Food
{
	class WeekMenu
	{
		public Dictionary<DayOfWeek, DayMenu> DailyMenus;

		public WeekMenu(Week week)
		{
			DailyMenus = new Dictionary<DayOfWeek, DayMenu>();

			XmlDocument doc = new XmlDocument();

			
			string fileName = Config.WeeksFolderPath + @"\" + week.FolderName + @"\menu.xml";

			doc.Load(fileName);

			XmlNode root = doc.DocumentElement;

			DayOfWeek currentDayOfWeek = DayOfWeek.Monday;

			foreach (XmlNode dayNode in root)
			{
				DayMenu dayMenu = new DayMenu(dayNode);
				DailyMenus.Add(currentDayOfWeek++, dayMenu);
			}
		}

	}
}
